package com.example.config;

import com.example.helper.ThreadManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

import javax.annotation.PostConstruct;
@Configuration
public class InitConfig {

    @Value("${spring.test.pass}")
    private String pass;

    @Value("${spring.test.nopass}")
    private String noPass;

    @Autowired
    private ThreadManager threadManager;

    @PostConstruct
    public void init(){
        System.out.println("pass = " + pass);
        System.out.println("noPass = " + noPass);
        for (int i = 0; i < 10; i++) {
            threadManager.run((10-i)*1000,"test"+i);
        }
    }
}
